<script src="/statics/js/layer.js"></script>
<!-- 头部开始 -->
<div class="header">
    <div class="header_m">我的收藏</div>
</div>
<!-- 头部结束 -->

<!--奖金明细开始-->
<div class="collection">
  <?php if($data){  ?>
	<foreach name="data" item="vo" >
    <dl>
    	<dt></dt>
        <dd class="collection-dd1">{{$vo.goods_title}}</dd>
        <dd class="collection-dd2">
        	<p>{{$vo.goods_price}}</p>
            <span class="removeIt" ></span>
			<input type="hidden" value="{{$vo.goods_id}}" name="goods_id" class="goods_id" />
        </dd>
    </dl>
   </foreach>
  <?php }else{?>
    <center  style="margin-top:40px;margin-bottom:40px;font-size:12px;">暂无收藏</center>
  <?php } ?>
  
</div>
<!--奖金明细结束-->

<div class="fiex nav"> <a class="icon-shouye" href="/index/index/sek/<?=$sek?>"><br />
  首页</a> <a class="icon-fenlei fiex_on" href="/cate/main/sek/<?=$sek?>"><br />
  分类</a> <a class="icon-gouwu" href="/cart/index/sek/<?=$sek?>"><span id="cartSum"></span><br />
  购物车</a> <a class="icon-geren" href="/index/user/sek/<?=$sek?>"><br />
  用户中心</a> </div>
</body>
<script type="text/javascript">
	$(function(){
		cartSum();
	});
</script>
<script type="text/javascript">
$('.removeIt').click(function(){
		_this = $(this);
		layer.confirm('确定删除该收藏吗？', {
			btn: ['确定','取消'] //按钮
				}, function(){
				    var goods_id = $(".goods_id").val();
					$.get('/goods/coldel',{'goods_id':goods_id,'del':1},function(data){
				        if(data ==1){
						    layer.msg('删除成功', {icon: 1});
							setTimeout(function(){location.reload();},1000);
						}else if(data ==0){
						    layer.msg('删除失败', {icon: 0});
						}
					
					})
				});
			return false;
		});
</script>
</html>